import {
	defineStore
} from 'pinia';

import {
	showConfirmDialog
} from "../hooks/useConfirm.js"

const USER_INFO = "USER_INFO";
const USER_TOKEN = "USER_TOKEN";



export const useDishesStore = defineStore('dishesStore', {
	state: () => ({
		dishesList: []
	}),
	getters: {
		ratingsRanking() {
			return this.dishesList.sort((a, b) => b.avgRating - a.avgRating);
		},
		wishlistRanking() {
			// this.dishesList.sort((a,b)=> a.)
			return this.dishesList;
		},
	},

});